package com.xiaoqian.partyembassy.ui.activity;

import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.xiaoqian.partyembassy.R;
import com.xiaoqian.partyembassy.adapter.MsgAdpter;
import com.xiaoqian.partyembassy.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

/**
 * @项目名称:
 * 包: com.dnake.yunduijiang
 * 类名称:
 * @类描述:
 * @创建人: 黄飞
 * @创建时间:
 * @修改人:
 * @修改时间:
 * @修改备注:
 * @版本: v1.0
 */

public class MsgActivity extends BaseActivity implements AdapterView.OnItemClickListener {
    private ListView msg_lv;
    private List<String> mList = new ArrayList<>();
    private TextView action_title;
    private ImageView action_back;
    @Override
    protected int getLayoutId() {
        return R.layout.activity_msg;
    }

    @Override
    protected void initParams() {

    }

    @Override
    protected void initView() {
        action_back = findViewById(R.id.action_back);
        action_back.setVisibility(View.VISIBLE);
        action_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                defaultFinish();
            }
        });
        action_title = findViewById(R.id.action_title);
        action_title.setText("未读消息");
       msg_lv = findViewById(R.id.msg_lv);
        mList.add("1");
        mList.add("1");
        MsgAdpter msgAdpter = new MsgAdpter(mContext,mList);
        msg_lv.setAdapter(msgAdpter);
        msg_lv.setOnItemClickListener(this);
    }

    @Override
    public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
        startActivity(MsgDetailsActivity.class);
    }
}
